# -*- coding: utf-8 -*-

# @Author : guoxin

# @Time : 2024/6/4 14:45

# @QQ :363673234

from time import sleep
from selenium.webdriver.common.by import By

from base.LeftMenuBase import LeftMenuBase
from base.ObjectMap import ObjectMap
from base.CheckGoodsDetailBase import CheckGoodsDetailBase


class CheckGoodsDetailPage(CheckGoodsDetailBase, ObjectMap):

    def click_goodsIcon(self, driver):
        """
        点击货源右侧图标
        :param driver:
        :param menu_name:
        :return:
        """
        goodsIcon_cpath = self.goods_icon()
        return self.element_click(driver, By.XPATH, goodsIcon_cpath)

    def click_rightList(self, driver,goods_list):
        """
        点击查看货源信息
        :param driver:
        :param menu_name:
        :return:
        """
        GoodsDetail_xpath = self.goods_rightlist_button(goods_list)
        return self.element_click(driver, By.XPATH, GoodsDetail_xpath)
    def goods_rightList(self,driver,goods_list):
        self.click_goodsIcon(driver)
        sleep(1.3)
        self.click_rightList(driver,goods_list)
    def click_goodsDeleteVerify(self,driver):
        DeleteVerify_xpath = self.goods_deleteVerify_button()
        return self.element_click(driver,By.XPATH, DeleteVerify_xpath)

